<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>DELETE</title>
    <style>
        * {margin: 0;padding: 0;box-sizing: border-box;}
        main {margin: 12px 16px;}
        ol {list-style-type: decimal;list-style-position: inside;}
        ol > li {color: blue;font-size: 15px;margin-bottom: 12px;font-weight: 700;}
        div.code {color: black;background: rgb(197, 238, 214);margin-top: 3px;padding: 6px 12px;font-size: 15px;font-weight: normal;}
        div.code > span {display: block;margin: 3px 0;}
        div.code > span::before {content: ">>>";margin-right: 8px;color: blue;}
        .remark {color: red;font-size: 13px;margin-left: 8px;font-weight: normal;}
        .remark::before {content: '*';color: red;margin-right: 8px;}
        span.notes {color: rgb(172, 72, 218);font-weight: 700;font-size: 14px;margin: 6px 0;}
    </style>
</head>
<body>
    <main>
        <ol>
            <li>删除
                <div class="code">
                    <span>delete_obj = ${model_name}.objects.filter(pk=1).delete()</span>
                </div>
                <div class="remark">1、不可在不可继续过滤的 QuerySet 上使用 delete()，如 get()</div>
                <div class="remark">2、删除后返回删除的对象</div>
            </li>
        </ol>
    </main>
</body>
</html>

